<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>场馆列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
</head>
<body>
<div class="container">
    <div class="flow">
        <div class="itemtitle">
            <h3>场馆列表</h3>
        </div>
    </div>
    
    <div class="h35"></div>
    <script type="text/javascript">
    $(function(){
        /* 全选 */
         $('.checkall').click(function(){
            var _self = this;
            $('.checkitem').each(function(){
                if (!this.disabled)
                {
                    $(this).attr('checked', _self.checked);
                }
            });
            $('.checkall').attr('checked', this.checked);
        });	 
    });
    </script>
    <form action="" method="get">
    <input type="hidden" name="m" value="<{$smarty.get.m}>">
    <input type="hidden" name="s" value="spot.php">
    <table class="select_table">
        <tbody>
            <tr>
            	<td class="pl0">
				<ul class="button">
                    <li>
                        <a class="a_button" href="?m=spot&s=spot_opt.php&act=add">添加场馆</a>
                    </li>
                    <li>
                        <a class="a_button" id="del_button" href="javascript:void();">删除</a>
                    </li>

                </ul>
                </td>
                <td width="400">
                <div class="select_box fr">
                <input placeholder="请输入场馆名称..." type="text" name="name" class="txt w250" value="<{$smarty.get.name}>"  />
                <input type="submit" value="搜索" />
                <a class="refresh" href="?m=<{$smarty.get.m}>&s=spot.php"></a>
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>

    <form action="" method="post" id="form" name="form">
    <input type="hidden" name="act" value="op" />
    <table class="table product">
        <tbody>
            <tr class="header">
                <th width="1"></th>
                <th width="20"><input type="checkbox" class="checkall" id="del"></th>
                <th width="150">操作</th>
                <th colspan="2" class="al">场馆名称</th>
                <th width="100">类型</th>
                <th width="100">电话</th>
                <th width="170">地址</th>
                <th width="30">状态</th>
                <th width="100">更新时间</th>
            </tr>
            <{foreach item=list from=$de.list}>
            <tr>
                <td></td>
                <td><input type="checkbox" value="<{$list.id}>" class="checkitem" name="chk[]"></td>
                <td>
                <a href="?m=spot&s=spot_opt.php&act=edit&editid=<{$list.id}>"><{$editimg}></a>
                    &nbsp;&nbsp;&nbsp;<a class="addtr" id="add" data-id="<{$list.id}>" href="javascript:void();">模型</a>
                </td>
                <td class="al" width="80" valign="top"><a target="_blank" href="../?m=spot&s=detail&id=<{$list.id}>"><img class="img" alt="<{$list.spot_name}>" src="<{$list.picurl}>" width="60" height="60" /></a></td>
                <td class="al">
                <h4><a target="_blank" href="../?m=spot&s=detail&id=<{$list.id}>"><{$list.spot_name}></a></h4>
                </td>
                <td><{$list.cat_name}></td>
                <td><{$list.tel}></td>
                <td><{$list.address}></td>
                <td><{if $list.statu == 1}>显示<{else}>不显示<{/if}></td>
                <td><{$list.add_time|date_format:"%Y-%m-%d<br>%H:%M:%S"}></td>
            </tr>
            <{foreachelse}>
            <tr>
                <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
            </tr>
            <{/foreach}>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="99" class="pages">
                <div class="fl">每页最多显示： 20条</div>
                <div class="page"><{$de.page}></div>
				<div class="fr">共有<{$de.count}>条记录</div>
                </td>
            </tr>
        </tfoot>
    </table>
    </form>
</div>
<script>
$("#del_button").click(function () {
		
	$("#form")[0].submit();
	return false;
});
$("#add").live('click',function(){
    var spot_id = $(this).attr('data-id');
    window.parent.iframe_form("spot_model", '添加模型', '<{$config.weburl}>/admin/module.php?m=spot&s=model_spot.php'+'&spot_id='+spot_id, 800, 600);
    return false;
});



</script>    
</body>
</html>